<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="./javascripts/bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" href="stylesheets/login.css">
<!--    <script src="./javascripts/bootstrap.js"></script>-->
<!--    <script src="./javascripts/jquery-1.11.3.js"></script>-->
<!--    <script src="./javascripts/jquery.min.js"></script>-->

    <title>登录</title>
    <style>
        input[type='submit'], a {
            color: cornflowerblue;
        }
    </style>
</head>
<body>

<div class="container-fluid">
<!--    <div class="header">-->
        <div class="row header">
            <div class="col-md-12">
                    <h1 class="tit">Kueiq音乐</h1>
                <div class="set">
                    <a href="logine.html">登录</a> ｜ <a href="index.html">退出</a> ｜ <a href="index.html">帮助</a>
                </div>
<!--            </div>-->
        </div>
    </div>
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <div class="login">
                <div class="bg"></div>
                <div class="main">
                    <form class="form-horizontal" >
                        <div class="form-group">
                            <label for="name" class="col-sm-2 control-label">
                                <span><img src="./img/user.png"></span>
                            </label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="name" name="name" placeholder="请输入用户名">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="pass" class="col-sm-2 control-label"><span><img src="./img/pwd.png"></span></label>
                            <div class="col-sm-10">
                                <input type="password" class="form-control" id="pass" name="pass" placeholder="请输入密码">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox"> 记住密码
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-default" onclick="denglu()" >登录</button>
<!--                                <a href="register.html">新用户？点击我进行注册</a>-->
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    function denglu(){
        var username = document.getElementById("name").value;
        var password = document.getElementById("pass").value;
        if(username=="admin" && password=="123456"){
            alert("登录成功");
            this.$router.push({ path: '/index.html' })
           return false;
        }
        else{
            alert("账号或密码错误");
            window.location.href= "./logine.html";
            return false;
        }
        setTimeout(denglu,2000);
    }
</script>
</body>
</html>